  

import { axios } from '@/service/service'

// 获取worker所有项目
export function getPros(
  params: any,
): any {
  return axios({
    url: '/api-scheduler/worker/getPros',
    method: 'get',
    params
  })
}

export function queryAllWorkerGroups(): any {
  return axios({
    url: '/worker-groups/all',
    method: 'get'
  })
}

// 查询worker列表
export function findWorkers(
  params: any,
): any {
  return axios({
    url: `/api-scheduler/worker/findWorkers`,
    method: 'get',
    params
  })
}

// 查询worker组列表
export function findWorkerGroups(
  params: any,
): any {
  return axios({
    url: `/api-scheduler/worker/findWorkerGroups`,
    method: 'get',
    params
  })
}

// 修改worker节点描述
export function updateDesc(
  params: any,
): any {
  return axios({
    url: `/api-scheduler/worker/updateDesc`,
    method: 'get',
    params
  })
}

// 修改worker节点名称
export function updateName(
  params: any,
): any {
  return axios({
    url: `/api-scheduler/worker/updateName`,
    method: 'get',
    params
  })
}

// 删除worker节点
export function deleteworkerNode(
  params: any,
): any {
  return axios({
    url: `/api-scheduler/worker/delete`,
    method: 'get',
    params
  })
}

// 删除worker组节点
export function delWorkerGroup(
  params: any,
): any {
  return axios({
    url: `/api-scheduler/worker/delWorkerGroup`,
    method: 'get',
    params
  })
}

